import request from '@/config/axios'

export interface MgmtNcrVO {
  id: number
  inspectionTaskCode: string
  ncrCode: string
  partCode: string
  partName: string
  defectiveQuantity: number
  drawingCode: string
  productCode: string
  dictConfigQualityInspectType: number
  dictResponsibleDept: number
  responsiblePerson: string
  problemDescription: string
  problemAttachmentId: string
  problemAttachmentName: string
  problemAttachmentPath: string
  dictNcrStatus: number
  dictNcrProcessResult: number
  customerName: string
  specification: string
  unit: string
  dictDiscoveryProcess: number
  supplierName: string
  dictMaterialType: number
  causeAnalysis: string
  causeAnalysisAttachmentId: string
  causeAnalysisAttachmentName: string
  causeAnalysisAttachmentPath: string
  creatorName: string
  productName: string
}

// 查询质量管理-品质管理-不良品记录列表
export const getDefectiveProductRecordPage = async (params) => {
  return await request.get({ url: `/quality/defective-product-record/page`, params })
}

// 查询质量管理-品质管理-不良品记录详情
export const getDefectiveProductRecord = async (id: number) => {
  return await request.get({ url: `/quality/defective-product-record/get?id=` + id })
}